package com.itheima.Test;

import java.util.Scanner;

public class Test8 {
    public static void main(String[] args) {
        System.out.println("请输入第一个数：");
        Scanner sc = new Scanner(System.in);
        int num1 = sc.nextInt();
        System.out.println("请输入第二个数：");
        int num2 = sc.nextInt();
        int start = 0;
        int end = 0;
        if(num1 > num2){
            start = num2;
            end = num1;
        } else {
            start = num1;
            end = num2;
        }
        int count = 0;
        for (int i = start; i <= end; i++) {
            if(i % 3 == 0 && i % 5 == 0){
                count += 1;
            }
        }
        System.out.println(count);
    }
}
